<script>
    const app = Vue.createApp(App);
    app.use(ElementPlus);
    app.mount("#app");
</script>
<script>
    function quitButtonClick() {
        layer.confirm('确认退出？', {
            btn: ['取消', '确定']
        }, () => layer.closeAll(), () => window.location.href = "<?ap path='/login'?>");
    }

    function navShowButtonClick() {
        let body_left = $('.body-left-wrapper');
        let body_left_status = body_left.is(':hidden');
        sa0.cookie.set('NavStatus', body_left_status ? 'show' : 'hide');
        checkNavStatus();
    }

    function checkNavStatus() {
        let nav_status = sa0.cookie.get('NavStatus');
        let nav_show_icon = $('.nav-show-icon-wrapper');
        let body_left = $('.body-left-wrapper');
        if (nav_status === 'show') {
            let body_right = $('.body-right-nav-hide');
            nav_show_icon.removeClass('el-icon-s-fold');
            nav_show_icon.addClass('el-icon-s-unfold');
            body_left.show();
            body_right.addClass('body-right-nav-show');
            body_right.removeClass('body-right-nav-hide');
        } else {
            let body_right = $('.body-right-nav-show');
            nav_show_icon.removeClass('el-icon-s-unfold');
            nav_show_icon.addClass('el-icon-s-fold');
            body_left.hide();
            body_right.addClass('body-right-nav-hide');
            body_right.removeClass('body-right-nav-show');
        }
    }

    checkNavStatus();
</script>
</html>